<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>axiethernet: xaxiethernet_example_intr_mcdma.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">axiethernet
   </div>
   <div id="projectbrief">Vitis Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Overview</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="globals.html"><span>APIs</span></a></li>
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="pages.html"><span>Examples</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('xaxiethernet__example__intr__mcdma_8c.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">xaxiethernet_example_intr_mcdma.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Overview</h2>
<div class="textblock"><p>Implements examples that utilize the Axi Ethernet's interrupt driven MCDMA packet transfer mode to send and receive frames. </p>
<p>These examples demonstrate:</p>
<ul>
<li>How to perform simple send and receive</li>
<li>Checksum offload</li>
<li>Error handling</li>
<li>Device reset</li>
<li>How to perform multiple frames send and receive</li>
</ul>
<p>Functional guide to example:</p>
<ul>
<li>AxiEthernetSgDmaIntrSingleFrameExample demonstrates the simplest way to send and receive frames in interrupt driven mode.</li>
<li>AxiEthernetSgDmaIntrMultiFrameExample demonstrates the way to send and recv Multiple frames in polling mode.</li>
<li>AxiEthernetSgDmaPartialChecksumOffloadExample demonstrates the partial checksum offloading. The HW must be setup for partial checksum offloading for this example to execute.</li>
<li>AxiEthernetSgDmaFullChecksumOffloadExample demonstrates the full checksum offloading. The HW must be setup for full checksum offloading for this example to execute.</li>
<li>AxiEthernetAxiEthernetErrorHandler() demonstrates how to manage asynchronous errors.</li>
<li><a class="el" href="xaxiethernet__example__polled_8c.html#a56e626d72ffba0a50d6c992df0f5eb6a" title="This function resets the device but preserves the options set by the user. ">AxiEthernetResetDevice()</a> demonstrates how to reset the driver/HW without losing all configuration settings.</li>
</ul>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date     Changes
</p>
<hr/>
<p>
5.5   adk           Initial Release.
</pre> </div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a94cba434bb36e1b6c037fa19b0c5ff2c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__example__intr__mcdma_8c.html#a94cba434bb36e1b6c037fa19b0c5ff2c">AxiEthernetSgDmaIntrExample</a> (INTC *IntcInstancePtr, <a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, u16 AxiEthernetDeviceId, u16 AxiMcDmaDeviceId, u16 AxiEthernetIntrId)</td></tr>
<tr class="memdesc:a94cba434bb36e1b6c037fa19b0c5ff2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function demonstrates the usage usage of the Axi Ethernet by sending and receiving frames in interrupt driven MCDMA mode.  <a href="#a94cba434bb36e1b6c037fa19b0c5ff2c">More...</a><br/></td></tr>
<tr class="separator:a94cba434bb36e1b6c037fa19b0c5ff2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3af031a9217ca954e3f9b659b369364"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__example__intr__mcdma_8c.html#aa3af031a9217ca954e3f9b659b369364">AxiEthernetSgDmaIntrSingleFrameExample</a> (<a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, u8 ChanId)</td></tr>
<tr class="memdesc:aa3af031a9217ca954e3f9b659b369364"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function demonstrates the usage of the Axi Ethernet by sending and receiving a single frame in SGDMA interrupt mode.  <a href="#aa3af031a9217ca954e3f9b659b369364">More...</a><br/></td></tr>
<tr class="separator:aa3af031a9217ca954e3f9b659b369364"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c113c7eca611c0a086606b3b95e4fa6"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__example__intr__mcdma_8c.html#a1c113c7eca611c0a086606b3b95e4fa6">AxiEthernetSgDmaIntrMultiFrameExample</a> (<a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, u8 ChanId)</td></tr>
<tr class="memdesc:a1c113c7eca611c0a086606b3b95e4fa6"><td class="mdescLeft">&#160;</td><td class="mdescRight">This function demonstrates the usage of the Axi Ethernet by sending and receiving a multiple frames in MCDMA interrupt mode.  <a href="#a1c113c7eca611c0a086606b3b95e4fa6">More...</a><br/></td></tr>
<tr class="separator:a1c113c7eca611c0a086606b3b95e4fa6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb9ed140372759970208ccdc305f7d88"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__example__intr__mcdma_8c.html#aeb9ed140372759970208ccdc305f7d88">AxiEthernetSgDmaPartialChecksumOffloadExample</a> (<a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, u8 ChanId)</td></tr>
<tr class="memdesc:aeb9ed140372759970208ccdc305f7d88"><td class="mdescLeft">&#160;</td><td class="mdescRight">This example sends and receives a single packet in loopback mode with checksum offloading support.  <a href="#aeb9ed140372759970208ccdc305f7d88">More...</a><br/></td></tr>
<tr class="separator:aeb9ed140372759970208ccdc305f7d88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5672898160ec7b5618a841f2ec55393e"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__example__intr__mcdma_8c.html#a5672898160ec7b5618a841f2ec55393e">AxiEthernetSgDmaFullChecksumOffloadExample</a> (<a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *AxiEthernetInstancePtr, XMcdma *DmaInstancePtr, u8 ChanId)</td></tr>
<tr class="memdesc:a5672898160ec7b5618a841f2ec55393e"><td class="mdescLeft">&#160;</td><td class="mdescRight">This example sends and receives a single packet in loopback mode with full checksum offloading support.  <a href="#a5672898160ec7b5618a841f2ec55393e">More...</a><br/></td></tr>
<tr class="separator:a5672898160ec7b5618a841f2ec55393e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a840291bc02cba5474a4cb46a9b9566fe"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="xaxiethernet__example__intr__mcdma_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr class="memdesc:a840291bc02cba5474a4cb46a9b9566fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the main function for the Axi Ethernet example.  <a href="#a840291bc02cba5474a4cb46a9b9566fe">More...</a><br/></td></tr>
<tr class="separator:a840291bc02cba5474a4cb46a9b9566fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a5672898160ec7b5618a841f2ec55393e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int AxiEthernetSgDmaFullChecksumOffloadExample </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *&#160;</td>
          <td class="paramname"><em>AxiEthernetInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XMcdma *&#160;</td>
          <td class="paramname"><em>DmaInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>ChanId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This example sends and receives a single packet in loopback mode with full checksum offloading support. </p>
<p>An Ethernet frame is formed with IP header, TCP header and payload. The hardware calculates the IP Header checksum and populates it at the appropriate location in the IP header. Similarly, the hardware calculates the TCP Pseudo header from IP header and calculates TCP checksum for TCP Pseudo header, TCP header and TCP payload. It then populates the checksum in the TCP header. The Ethernet frame is then looped back and received. The hardware validates the IP header checksum and the TCP checksum. The example retrieves the checksum validation information from the AXI4- Stream Appword2.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">AxiEthernetInstancePtr</td><td>is a pointer to the instance of the AxiEthernet component. </td></tr>
    <tr><td class="paramname">DmaInstancePtr</td><td>is a pointer to the instance of the Dma component. </td></tr>
    <tr><td class="paramname">ChanId</td><td>is the MCDMA Channel number to be operate on.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>-XST_SUCCESS to indicate success -XST_FAILURE to indicate failure</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None.</dd></dl>
<p>An Ethernet frame is formed with IP header, TCP header and payload. The hardware calculates the IP Header checksum and populates it at the appropriate location in the IP header. Similarly, the hardware calculates the TCP Pseudo header from IP header and calculates TCP checksum for TCP Pseudo header, TCP header and TCP payload. It then populates the checksum in the TCP header. The Ethernet frame is then looped back and received. The hardware validates the IP header checksum and the TCP checksum. The example retrieves the checksum validation information from the AXI4- Stream Appword2.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">AxiEthernetInstancePtr</td><td>is a pointer to the instance of the AxiEthernet component. </td></tr>
    <tr><td class="paramname">DmaInstancePtr</td><td>is a pointer to the instance of the Dma component.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>-XST_SUCCESS to indicate success -XST_FAILURE to indicate failure</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xaxiethernet__example_8h.html#ad700d3b9e292277d5437ecc4dc304dc3">AxiEthernetUtilErrorTrap()</a>, <a class="el" href="xaxiethernet__example_8h.html#a1eb6d3a3d578519d065f1e674d00f144">AxiEthernetUtilFrameHdrFormatMAC()</a>, <a class="el" href="xaxiethernet__example_8h.html#aa8c4f8ca2870764a5708ae0458d2b96a">AxiEthernetUtilFrameHdrFormatType()</a>, <a class="el" href="xaxiethernet__example_8h.html#a5b2b391e4495ed818546c7ec695a724a">AxiEthernetUtilFrameSetPayloadData()</a>, <a class="el" href="group__axiethernet.html#ga28f85be33530a1bf741db5f9738e3a14">XAE_INT_RECV_ERROR_MASK</a>, <a class="el" href="group__axiethernet.html#ga027d60f8fd28b519cad51e450b71c07b">XAE_RECEIVER_ENABLE_OPTION</a>, <a class="el" href="group__axiethernet.html#ga1e81b6f5f677ed0370507c117b565b20">XAE_TRANSMITTER_ENABLE_OPTION</a>, <a class="el" href="group__axiethernet.html#gab5476b0e04b0ecd8f9fd027f90ea648f">XAxiEthernet_IntEnable</a>, <a class="el" href="group__axiethernet.html#gae3265620b9d9b86643abe5ff5e2b7d79">XAxiEthernet_SetOptions()</a>, <a class="el" href="group__axiethernet.html#ga2cfa48d42e55238f6f30aff6d658e4fe">XAxiEthernet_Start()</a>, and <a class="el" href="group__axiethernet.html#ga4e952a55f342f176ba9ec2b49e2e47cb">XAxiEthernet_Stop()</a>.</p>

<p>Referenced by <a class="el" href="xaxiethernet__example__intr__mcdma_8c.html#a94cba434bb36e1b6c037fa19b0c5ff2c">AxiEthernetSgDmaIntrExample()</a>, and <a class="el" href="xaxiethernet__example__mcdma__poll_8c.html#ab383afd853a8d97fa420cc7d0dadec6b">AxiEthernetSgDmaPollExample()</a>.</p>

</div>
</div>
<a class="anchor" id="a94cba434bb36e1b6c037fa19b0c5ff2c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int AxiEthernetSgDmaIntrExample </td>
          <td>(</td>
          <td class="paramtype">INTC *&#160;</td>
          <td class="paramname"><em>IntcInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *&#160;</td>
          <td class="paramname"><em>AxiEthernetInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XMcdma *&#160;</td>
          <td class="paramname"><em>DmaInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>AxiEthernetDeviceId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>AxiMcDmaDeviceId</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u16&#160;</td>
          <td class="paramname"><em>AxiEthernetIntrId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function demonstrates the usage usage of the Axi Ethernet by sending and receiving frames in interrupt driven MCDMA mode. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">IntcInstancePtr</td><td>is a pointer to the instance of the Intc component. </td></tr>
    <tr><td class="paramname">AxiEthernetInstancePtr</td><td>is a pointer to the instance of the AxiEthernet component. </td></tr>
    <tr><td class="paramname">DmaInstancePtr</td><td>is a pointer to the instance of the AXI MCDMA component. </td></tr>
    <tr><td class="paramname">AxiEthernetDeviceId</td><td>is Device ID of the Axi Ethernet Device , typically XPAR_&lt;AXIETHERNET_instance&gt;_DEVICE_ID value from xparameters.h. </td></tr>
    <tr><td class="paramname">AxiMcDmaDeviceId</td><td>is Device ID of the Axi DMAA Device , typically XPAR_&lt;AXIMCDMA_instance&gt;_DEVICE_ID value from xparameters.h. </td></tr>
    <tr><td class="paramname">AxiEthernetIntrId</td><td>is the Interrupt ID and is typically XPAR_&lt;INTC_instance&gt;_&lt;AXIETHERNET_instance&gt;_VEC_ID value from xparameters.h.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>-XST_SUCCESS to indicate success -XST_FAILURE to indicate failure</dd></dl>
<dl class="section note"><dt>Note</dt><dd>AxiMcdma hardware must be initialized before initializing AxiEthernet. Since AxiMcdma reset line is connected to the AxiEthernet reset line, a reset of AxiMcdma hardware during its initialization would reset AxiEthernet. </dd></dl>

<p>References <a class="el" href="struct_x_axi_ethernet___config.html#a34b00c1ae0534cb0e956feb2a834e820">XAxiEthernet_Config::AxiDevBaseAddress</a>, <a class="el" href="struct_x_axi_ethernet___config.html#a58df9c31ad87109bd294fb26a8af9630">XAxiEthernet_Config::AxiDevType</a>, <a class="el" href="xaxiethernet__example__intr__mcdma_8c.html#a5672898160ec7b5618a841f2ec55393e">AxiEthernetSgDmaFullChecksumOffloadExample()</a>, <a class="el" href="xaxiethernet__example__intr__mcdma_8c.html#a1c113c7eca611c0a086606b3b95e4fa6">AxiEthernetSgDmaIntrMultiFrameExample()</a>, <a class="el" href="xaxiethernet__example__intr__mcdma_8c.html#aa3af031a9217ca954e3f9b659b369364">AxiEthernetSgDmaIntrSingleFrameExample()</a>, <a class="el" href="xaxiethernet__example__intr__mcdma_8c.html#aeb9ed140372759970208ccdc305f7d88">AxiEthernetSgDmaPartialChecksumOffloadExample()</a>, <a class="el" href="xaxiethernet__example_8h.html#ac864e2449120d62d81370b033fc89c42">AxiEthernetUtilEnterLoopback()</a>, <a class="el" href="xaxiethernet__example_8h.html#ad700d3b9e292277d5437ecc4dc304dc3">AxiEthernetUtilErrorTrap()</a>, <a class="el" href="xaxiethernet__example_8h.html#a561ef796435e1aa0b0eb5013bfb54cea">AxiEthernetUtilFrameVerify()</a>, <a class="el" href="xaxiethernet__example_8h.html#a0ab0dcd0f95007ddcc441c7cbc5f45dc">AxiEthernetUtilPhyDelay()</a>, <a class="el" href="struct_x_axi_ethernet___config.html#a7237b3da2b79a7dcfe714a2ebab7dcf6">XAxiEthernet_Config::AxiMcDmaChan_Cnt</a>, <a class="el" href="struct_x_axi_ethernet___config.html#ae3fc04787ba28bb14e6c2add45c0c086">XAxiEthernet_Config::BaseAddress</a>, <a class="el" href="struct_x_axi_ethernet.html#adda2f024038f99905bb2ca8ab85854eb">XAxiEthernet::Config</a>, <a class="el" href="struct_x_axi_ethernet___config.html#a2f7746d5503d4aa101cc463706466b3d">XAxiEthernet_Config::Enable_1588</a>, <a class="el" href="struct_x_axi_ethernet___config.html#ab32e0ce8a1d825dbee5e949522a134bf">XAxiEthernet_Config::Speed</a>, <a class="el" href="group__axiethernet.html#gadf2299b3e254b7915b0b951ad3490f7e">XAE_INT_RXFIFOOVR_MASK</a>, <a class="el" href="group__axiethernet.html#gaa5ac7291090f44c1a2057589f2660b6c">XAE_INT_RXRJECT_MASK</a>, <a class="el" href="group__axiethernet.html#gabe257efe600df43d8148c772ea3878f9">XAxiEthernet_CfgInitialize()</a>, <a class="el" href="group__axiethernet.html#gadc2cf9ec186f1dffaece1552f96fcdd9">XAxiEthernet_GetPhysicalInterface</a>, <a class="el" href="group__axiethernet.html#gaaaef83a7f1fe4d8ca117cf6bc80500a8">XAxiEthernet_IntClear</a>, <a class="el" href="group__axiethernet.html#ga492b674e8d7584ed5e73e2b1a886bcc3">XAxiEthernet_IntPending</a>, <a class="el" href="group__axiethernet.html#ga70ae7bc7e8d22aa1c7be7076c83d4015">XAxiEthernet_IsRxFullCsum</a>, <a class="el" href="group__axiethernet.html#gae21c088294f79359ed1ee74468100e9a">XAxiEthernet_IsRxPartialCsum</a>, <a class="el" href="group__axiethernet.html#ga4764b3156c37e0b505c4df69b105b770">XAxiEthernet_IsRxVlanStrp</a>, <a class="el" href="group__axiethernet.html#ga16debcb3a008c09bc8c4e29764310cae">XAxiEthernet_IsRxVlanTag</a>, <a class="el" href="group__axiethernet.html#ga04ad5f292476ee8d62a2cacc66bf8767">XAxiEthernet_IsRxVlanTran</a>, <a class="el" href="group__axiethernet.html#ga8d1defd403ed40f023650e1e44651c88">XAxiEthernet_IsTxFullCsum</a>, <a class="el" href="group__axiethernet.html#ga6e44788bbc239e6cea83d1e07ddb65ed">XAxiEthernet_IsTxPartialCsum</a>, <a class="el" href="group__axiethernet.html#ga92ea2563addd13a5d3008a0bd9d069bc">XAxiEthernet_IsTxVlanStrp</a>, <a class="el" href="group__axiethernet.html#ga2d75475a1e85f44562fd614960744b23">XAxiEthernet_IsTxVlanTag</a>, <a class="el" href="group__axiethernet.html#gaac1bbeb5294915665aae439a33e3b887">XAxiEthernet_IsTxVlanTran</a>, <a class="el" href="group__axiethernet.html#ga781a4d89a7a3a9d59ac8921ba66b353d">XAxiEthernet_LookupConfig()</a>, <a class="el" href="group__axiethernet.html#gab2d0106f26a1a2e1f2b902dc0a2822c9">XAxiEthernet_SetOperatingSpeed()</a>, and <a class="el" href="group__axiethernet.html#ga4e952a55f342f176ba9ec2b49e2e47cb">XAxiEthernet_Stop()</a>.</p>

<p>Referenced by <a class="el" href="xaxiethernet__example__intr__mcdma_8c.html#a840291bc02cba5474a4cb46a9b9566fe">main()</a>.</p>

</div>
</div>
<a class="anchor" id="a1c113c7eca611c0a086606b3b95e4fa6"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int AxiEthernetSgDmaIntrMultiFrameExample </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *&#160;</td>
          <td class="paramname"><em>AxiEthernetInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XMcdma *&#160;</td>
          <td class="paramname"><em>DmaInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>ChanId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function demonstrates the usage of the Axi Ethernet by sending and receiving a multiple frames in MCDMA interrupt mode. </p>
<p>Each source packet will be described by two descriptors. It will be received into a buffer described by a single descriptor.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">AxiEthernetInstancePtr</td><td>is a pointer to the instance of the Axi Ethernet component. </td></tr>
    <tr><td class="paramname">DmaInstancePtr</td><td>is a pointer to the instance of the Dma component. </td></tr>
    <tr><td class="paramname">ChanId</td><td>is the MCDMA Channel number to be operate on.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>-XST_SUCCESS to indicate success -XST_FAILURE to indicate failure</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xaxiethernet__example_8h.html#ad700d3b9e292277d5437ecc4dc304dc3">AxiEthernetUtilErrorTrap()</a>, <a class="el" href="xaxiethernet__example_8h.html#a1eb6d3a3d578519d065f1e674d00f144">AxiEthernetUtilFrameHdrFormatMAC()</a>, <a class="el" href="xaxiethernet__example_8h.html#aa8c4f8ca2870764a5708ae0458d2b96a">AxiEthernetUtilFrameHdrFormatType()</a>, <a class="el" href="xaxiethernet__example_8h.html#a69500ccf415291fc54dfc53333f98a07">AxiEthernetUtilFrameMemClear()</a>, <a class="el" href="xaxiethernet__example_8h.html#a5b2b391e4495ed818546c7ec695a724a">AxiEthernetUtilFrameSetPayloadData()</a>, <a class="el" href="group__axiethernet.html#ga027d60f8fd28b519cad51e450b71c07b">XAE_RECEIVER_ENABLE_OPTION</a>, <a class="el" href="group__axiethernet.html#ga1e81b6f5f677ed0370507c117b565b20">XAE_TRANSMITTER_ENABLE_OPTION</a>, <a class="el" href="group__axiethernet.html#gab2298b2b1af89cf0f0a78d4fda03ed7f">XAxiEthernet_SetMacAddress()</a>, <a class="el" href="group__axiethernet.html#gae3265620b9d9b86643abe5ff5e2b7d79">XAxiEthernet_SetOptions()</a>, <a class="el" href="group__axiethernet.html#ga2cfa48d42e55238f6f30aff6d658e4fe">XAxiEthernet_Start()</a>, and <a class="el" href="group__axiethernet.html#ga4e952a55f342f176ba9ec2b49e2e47cb">XAxiEthernet_Stop()</a>.</p>

<p>Referenced by <a class="el" href="xaxiethernet__example__intr__mcdma_8c.html#a94cba434bb36e1b6c037fa19b0c5ff2c">AxiEthernetSgDmaIntrExample()</a>.</p>

</div>
</div>
<a class="anchor" id="aa3af031a9217ca954e3f9b659b369364"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int AxiEthernetSgDmaIntrSingleFrameExample </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *&#160;</td>
          <td class="paramname"><em>AxiEthernetInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XMcdma *&#160;</td>
          <td class="paramname"><em>DmaInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>ChanId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This function demonstrates the usage of the Axi Ethernet by sending and receiving a single frame in SGDMA interrupt mode. </p>
<p>The source packet will be described by two descriptors. It will be received into a buffer described by a single descriptor.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">AxiEthernetInstancePtr</td><td>is a pointer to the instance of the Axi Ethernet component. </td></tr>
    <tr><td class="paramname">DmaInstancePtr</td><td>is a pointer to the instance of the Dma component. </td></tr>
    <tr><td class="paramname">ChanId</td><td>is the MCDMA Channel number to be operate on.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>-XST_SUCCESS to indicate success -XST_FAILURE to indicate failure</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xaxiethernet__example_8h.html#ad700d3b9e292277d5437ecc4dc304dc3">AxiEthernetUtilErrorTrap()</a>, <a class="el" href="xaxiethernet__example_8h.html#a1eb6d3a3d578519d065f1e674d00f144">AxiEthernetUtilFrameHdrFormatMAC()</a>, <a class="el" href="xaxiethernet__example_8h.html#aa8c4f8ca2870764a5708ae0458d2b96a">AxiEthernetUtilFrameHdrFormatType()</a>, <a class="el" href="xaxiethernet__example_8h.html#a69500ccf415291fc54dfc53333f98a07">AxiEthernetUtilFrameMemClear()</a>, <a class="el" href="xaxiethernet__example_8h.html#a5b2b391e4495ed818546c7ec695a724a">AxiEthernetUtilFrameSetPayloadData()</a>, <a class="el" href="group__axiethernet.html#ga027d60f8fd28b519cad51e450b71c07b">XAE_RECEIVER_ENABLE_OPTION</a>, <a class="el" href="group__axiethernet.html#ga1e81b6f5f677ed0370507c117b565b20">XAE_TRANSMITTER_ENABLE_OPTION</a>, <a class="el" href="group__axiethernet.html#gab2298b2b1af89cf0f0a78d4fda03ed7f">XAxiEthernet_SetMacAddress()</a>, <a class="el" href="group__axiethernet.html#gae3265620b9d9b86643abe5ff5e2b7d79">XAxiEthernet_SetOptions()</a>, <a class="el" href="group__axiethernet.html#ga2cfa48d42e55238f6f30aff6d658e4fe">XAxiEthernet_Start()</a>, and <a class="el" href="group__axiethernet.html#ga4e952a55f342f176ba9ec2b49e2e47cb">XAxiEthernet_Stop()</a>.</p>

<p>Referenced by <a class="el" href="xaxiethernet__example__intr__mcdma_8c.html#a94cba434bb36e1b6c037fa19b0c5ff2c">AxiEthernetSgDmaIntrExample()</a>.</p>

</div>
</div>
<a class="anchor" id="aeb9ed140372759970208ccdc305f7d88"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int AxiEthernetSgDmaPartialChecksumOffloadExample </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="struct_x_axi_ethernet.html">XAxiEthernet</a> *&#160;</td>
          <td class="paramname"><em>AxiEthernetInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">XMcdma *&#160;</td>
          <td class="paramname"><em>DmaInstancePtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">u8&#160;</td>
          <td class="paramname"><em>ChanId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This example sends and receives a single packet in loopback mode with checksum offloading support. </p>
<p>The transmit frame will be che cksummed over the entire Ethernet payload and inserted into the last 2 bytes of the frame.</p>
<p>On receive, HW should calculate the Ethernet payload checksum and return a value of 0xFFFF which means the payload data was likely not corrupted.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">AxiEthernetInstancePtr</td><td>is a pointer to the instance of the AxiEthernet component. </td></tr>
    <tr><td class="paramname">DmaInstancePtr</td><td>is a pointer to the instance of the Dma component. </td></tr>
    <tr><td class="paramname">ChanId</td><td>is the MCDMA Channel number to be operate on.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>-XST_SUCCESS to indicate success -XST_FAILURE to indicate failure</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None.</dd></dl>
<p>The transmit frame will be che cksummed over the entire Ethernet payload and inserted into the last 2 bytes of the frame.</p>
<p>On receive, HW should calculate the Ethernet payload checksum and return a value of 0xFFFF which means the payload data was likely not corrupted.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">AxiEthernetInstancePtr</td><td>is a pointer to the instance of the AxiEthernet component. </td></tr>
    <tr><td class="paramname">DmaInstancePtr</td><td>is a pointer to the instance of the Dma component.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>-XST_SUCCESS to indicate success -XST_FAILURE to indicate failure</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xaxiethernet__example_8h.html#ad700d3b9e292277d5437ecc4dc304dc3">AxiEthernetUtilErrorTrap()</a>, <a class="el" href="xaxiethernet__example_8h.html#a1eb6d3a3d578519d065f1e674d00f144">AxiEthernetUtilFrameHdrFormatMAC()</a>, <a class="el" href="xaxiethernet__example_8h.html#aa8c4f8ca2870764a5708ae0458d2b96a">AxiEthernetUtilFrameHdrFormatType()</a>, <a class="el" href="xaxiethernet__example_8h.html#a69500ccf415291fc54dfc53333f98a07">AxiEthernetUtilFrameMemClear()</a>, <a class="el" href="xaxiethernet__example_8h.html#a5b2b391e4495ed818546c7ec695a724a">AxiEthernetUtilFrameSetPayloadData()</a>, <a class="el" href="group__axiethernet.html#ga28f85be33530a1bf741db5f9738e3a14">XAE_INT_RECV_ERROR_MASK</a>, <a class="el" href="group__axiethernet.html#ga027d60f8fd28b519cad51e450b71c07b">XAE_RECEIVER_ENABLE_OPTION</a>, <a class="el" href="group__axiethernet.html#ga1e81b6f5f677ed0370507c117b565b20">XAE_TRANSMITTER_ENABLE_OPTION</a>, <a class="el" href="group__axiethernet.html#gab5476b0e04b0ecd8f9fd027f90ea648f">XAxiEthernet_IntEnable</a>, <a class="el" href="group__axiethernet.html#gae21c088294f79359ed1ee74468100e9a">XAxiEthernet_IsRxPartialCsum</a>, <a class="el" href="group__axiethernet.html#ga6e44788bbc239e6cea83d1e07ddb65ed">XAxiEthernet_IsTxPartialCsum</a>, <a class="el" href="group__axiethernet.html#gae3265620b9d9b86643abe5ff5e2b7d79">XAxiEthernet_SetOptions()</a>, <a class="el" href="group__axiethernet.html#ga2cfa48d42e55238f6f30aff6d658e4fe">XAxiEthernet_Start()</a>, and <a class="el" href="group__axiethernet.html#ga4e952a55f342f176ba9ec2b49e2e47cb">XAxiEthernet_Stop()</a>.</p>

<p>Referenced by <a class="el" href="xaxiethernet__example__intr__mcdma_8c.html#a94cba434bb36e1b6c037fa19b0c5ff2c">AxiEthernetSgDmaIntrExample()</a>, and <a class="el" href="xaxiethernet__example__mcdma__poll_8c.html#ab383afd853a8d97fa420cc7d0dadec6b">AxiEthernetSgDmaPollExample()</a>.</p>

</div>
</div>
<a class="anchor" id="a840291bc02cba5474a4cb46a9b9566fe"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is the main function for the Axi Ethernet example. </p>
<p>This function is not included if the example is generated from the TestAppGen test tool.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">None.</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>- XST_SUCCESS to indicate success.<ul>
<li>XST_FAILURE to indicate failure</li>
</ul>
</dd></dl>
<dl class="section note"><dt>Note</dt><dd>None. </dd></dl>

<p>References <a class="el" href="xavb__example_8c.html#a249ec82daff032bfe981d21980bae55c">AXIETHERNET_DEVICE_ID</a>, <a class="el" href="xaxiethernet__example__intr__mcdma_8c.html#a94cba434bb36e1b6c037fa19b0c5ff2c">AxiEthernetSgDmaIntrExample()</a>, and <a class="el" href="xaxiethernet__example_8h.html#ad700d3b9e292277d5437ecc4dc304dc3">AxiEthernetUtilErrorTrap()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
	<p class="footer">&copy; Copyright 2015-2022 Xilinx, Inc. All Rights Reserved.</p>
	<p class="footer">&copy; Copyright 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.</p>
</div>
</body>
</html>
